package com.rboat.blog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.blog.mapper.BlogPhotoMapper;
import com.rboat.blog.domain.BlogPhoto;
import com.rboat.blog.service.IBlogPhotoService;
import com.rboat.common.core.text.Convert;

/**
 * 相册Service业务层处理
 * 
 * @author rboat
 * @date 2019-11-05
 */
@Service
public class BlogPhotoServiceImpl implements IBlogPhotoService 
{
    @Autowired
    private BlogPhotoMapper blogPhotoMapper;

    /**
     * 查询相册
     * 
     * @param id 相册ID
     * @return 相册
     */
    @Override
    public BlogPhoto selectBlogPhotoById(String id)
    {
        return blogPhotoMapper.selectBlogPhotoById(id);
    }

    /**
     * 查询相册列表
     * 
     * @param blogPhoto 相册
     * @return 相册
     */
    @Override
    public List<BlogPhoto> selectBlogPhotoList(BlogPhoto blogPhoto)
    {
        return blogPhotoMapper.selectBlogPhotoList(blogPhoto);
    }

    /**
     * 新增相册
     * 
     * @param blogPhoto 相册
     * @return 结果
     */
    @Override
    public int insertBlogPhoto(BlogPhoto blogPhoto)
    {
        return blogPhotoMapper.insertBlogPhoto(blogPhoto);
    }

    /**
     * 修改相册
     * 
     * @param blogPhoto 相册
     * @return 结果
     */
    @Override
    public int updateBlogPhoto(BlogPhoto blogPhoto)
    {
        return blogPhotoMapper.updateBlogPhoto(blogPhoto);
    }

    /**
     * 删除相册对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBlogPhotoByIds(String ids)
    {
        return blogPhotoMapper.deleteBlogPhotoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除相册信息
     * 
     * @param id 相册ID
     * @return 结果
     */
    @Override
    public int deleteBlogPhotoById(String id)
    {
        return blogPhotoMapper.deleteBlogPhotoById(id);
    }
}
